package com.sunny.springboot2.enums;

/**
 * 异常枚举类
 *  1 开头为普通异常类型
 *  2 开头为业务异常
 *  9 开头为系统层异常类型
 *
 * @author sunny
 * @date 2018/11/30
 */
public enum ExceptionEnums {
    PARAM_EXCEPTION(100001, "参数异常"),

    SERVER_NOT_EXiSTS_EXCEPTION(200001, "服务不存在异常"),
    PORT_RANGE_EXCEPTION(200002, "超出端口异常"),


    SYSTEM_EXCEPTION(900001, "系统异常"),


    ;
    private Integer errorCode;
    private String errorMessage;

    public Integer getErrorCode() {
        return errorCode;
    }

    public String getErrorMessage() {
        return errorMessage;
    }

    ExceptionEnums(Integer errorCode, String errorMessage) {
        this.errorCode = errorCode;
        this.errorMessage = errorMessage;
    }
}
